/**
 * Copyright (c) 2014-2016 www.nryuncang.com. All Rights Reserved.
 */
package com.topisv.tms.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import com.topisv.tms.entity.interfacetask.InterfaceTaskEnum;

/**
 * 
 *
 * @author <a href=mailto:zhangweize@nryuncang.com>zhangweize</a>
 * @version 1.0.0
 */
@Entity
@Table(name="order_back_task")
public class OrderBackTask  extends IdEntity {
	private static final long serialVersionUID = 1L;

    /** 订单类型 
     * {@link InterfaceTaskEnum}
     */
    private String type;
    
    /** 商家编码 */
    private String customerCode;
    
    /** 相关单号，如订单号 */
    private String relatedNo;
    
    /** 相关数据ID， 如订单ID */
    private Long relatedId = 0L;
    
    /** 任务创建时间 */
    private Date createdTime;
    
    /** 任务更新时间，一般指最后一次发送接口成功的时间 */
    private Date updatedTime;
    
    /** 接口发送尝试次数 */
    private int retryTimes = 0;
    
    /**
     * 接口任务状态, 默认： {@value}
     * <p><code>READY</code> 表示创建完任务
     * <p><code>FINISH</code> 表示接口已成功处理
     * <p><code>ERROR</code> 表示接口处理失败
     * {@link InterfaceTaskEnum}
     */
    private String status = "READY";

    /**
     * 错误归属方，默认：{@value}
     * <p><code>-</code> 表示无
     * <p><code>SELF</code> 表示内部系统错误
     * <p><code>THIRD</code> 表示第三方系统错误
     * {@link InterfaceTaskEnum}
     */
    private String errorWho = "-";
    
    /** 错误消息 */
    private String errorMsg = "-";
    
    /** 节点，默认：{@value} */
    private String node = "-";

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getCustomerCode() {
		return customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public String getRelatedNo() {
		return relatedNo;
	}

	public void setRelatedNo(String relatedNo) {
		this.relatedNo = relatedNo;
	}

	public Long getRelatedId() {
		return relatedId;
	}

	public void setRelatedId(Long relatedId) {
		this.relatedId = relatedId;
	}

	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	public Date getUpdatedTime() {
		return updatedTime;
	}

	public void setUpdatedTime(Date updatedTime) {
		this.updatedTime = updatedTime;
	}

	public int getRetryTimes() {
		return retryTimes;
	}

	public void setRetryTimes(int retryTimes) {
		this.retryTimes = retryTimes;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getErrorWho() {
		return errorWho;
	}

	public void setErrorWho(String errorWho) {
		this.errorWho = errorWho;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public String getNode() {
		return node;
	}

	public void setNode(String node) {
		this.node = node;
	}
    
}
